﻿@model ServerManager.Models.Server

@{
    ViewData["Title"] = "CreateOrUpdate";
}

<div style="height:40px;line-height:40px;margin-top:10px;">
    <div style="float:left;font-size:2em;">服务器新建或更新</div>
    <div style="float:right"><a class="btn btn-info" asp-action="Index">返回列表</a></div>
</div>
<hr />
<form asp-action="CreateOrUpdate">
    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
    <table class="my-table">
        <tr>
            <td class="col-md-1"> <label asp-for="Brand" class="control-label"></label></td>
            <td class="col-md-5">
                <input asp-for="Brand" class="form-control" />
                <span asp-validation-for="Brand" class="text-danger"></span>
            </td>
            <td class="col-md-1"><label asp-for="Status" class="control-label"></label></td>
            <td class="col-md-5"><select asp-for="Status" class="form-control" asp-items="ViewBag.StatusList"></select></td>
        </tr>
        <tr>
            <td><label asp-for="Cpu" class="control-label"></label></td>
            <td>
                <input asp-for="Cpu" class="form-control" />
                <span asp-validation-for="Cpu" class="text-danger"></span>
            </td>
            <td><label asp-for="Memory" class="control-label"></label></td>
            <td>
                <input asp-for="Memory" class="form-control" />
                <span asp-validation-for="Memory" class="text-danger"></span>
            </td>
        </tr>
        <tr>
            <td> <label asp-for="HardDisk" class="control-label"></label></td>
            <td>
                <input asp-for="HardDisk" class="form-control" />
                <span asp-validation-for="HardDisk" class="text-danger"></span>
            </td>
            <td><label asp-for="Position" class="control-label"></label></td>
            <td>
                <input asp-for="Position" class="form-control" />
                <span asp-validation-for="Position" class="text-danger"></span>
            </td>
        </tr>
        <tr>
            <td><label asp-for="Code" class="control-label"></label></td>
            <td>
                <input asp-for="Code" class="form-control" />
                <span asp-validation-for="Code" class="text-danger"></span>
            </td>
            <td> <label asp-for="Remark" class="control-label"></label></td>
            <td>
                <textarea asp-for="Remark" class="form-control" ></textarea>
                <span asp-validation-for="Remark" class="text-danger"></span>
            </td>
        </tr>
    </table>
    <div class="form-group">
        <input type="submit" value="确定" class="btn btn-success" />
    </div>
</form>


    @section Scripts {
        @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
    }
